package com.lyf.system.api;

import com.lyf.common.core.constant.SecurityConstants;
import com.lyf.common.core.constant.ServiceNameConstants;
import com.lyf.common.core.domain.R;
import com.lyf.common.core.web.domain.AjaxResult;
import com.lyf.common.core.web.page.TableDataInfo;
import com.lyf.system.api.domain.Supermarket;
import com.lyf.system.api.domain.SysUser;
import com.lyf.system.api.factory.RemoteSupermarketFallbackFactory;
import com.lyf.system.api.factory.RemoteUserFallbackFactory;
import com.lyf.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * 用户服务
 * 
 */
@FeignClient(contextId = "remoteSupermarketService", value = ServiceNameConstants.SUPERMARKET_SERVICE, fallbackFactory = RemoteSupermarketFallbackFactory.class)
public interface RemoteSupermarketService
{
   /**
     * 查询超市列表
     */
    @PostMapping("/supermarket/listAndUser")
    public R<List<Supermarket>> listAndUser(@RequestBody Supermarket supermarket,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    /**
     * 获取详情
     * @param userId
     * @return
     */
    @GetMapping(value = "/supermarket/user/{userId}")
    public R<List<Long>> selectSupermarketListByUserId(@PathVariable("userId") Long userId);


 @GetMapping("/number/updateDay")
 public R<Boolean> updateByDay(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
